pimpas.CleanUp = Class.create( );
pimpas.Extends(pimpas.CleanUp, pimpas.Object);
pimpas.Extends(pimpas.CleanUp,
   {
	   interval: null,
	   time: 6*100000,
   	   initialize: function() {
			this.id = pimpas.globalID++;
			this.log = new pimpas.Log();
			this.interval = new pimpas.Interval(this.time, pimpas.CleanUp.doClean, pimpas.CleanUp);
			this.interval.go();
	   },
	   doClean: function() {
		   //this.log.info("[CleanUp Procedure]: Cleaning all logs!");
		   for(var i=0;i<pimpas.Log.instances.length;i++)
				pimpas.Log.instances[i].flush( );
	   }
   }
);

pimpas.CleanUp.initialize( );